<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>MySQL增强版扩展</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mysqlinfo.concepts.charset.html">« Character sets</a></li>
      <li style="float: right;"><a href="intro.mysqli.html">简介 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="set.mysqlinfo.html">MySQL</a></li>
    <li>MySQL增强版扩展</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="book.mysqli" class="book">

 <h1 class="title">MySQL增强版扩展</h1>

 



 


 
 



 



 








 





 









 






 






 



 



 



 



 




 



 


 



 







 








 









<ul class="chunklist chunklist_book"><li><a href="intro.mysqli.html">简介</a></li><li><a href="mysqli.overview.html">Overview</a></li><li><a href="mysqli.quickstart.html">Quick start guide</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli.quickstart.dual-interface.html">Dual procedural and object-oriented interface</a></li><li><a href="mysqli.quickstart.connections.html">Connections</a></li><li><a href="mysqli.quickstart.statements.html">Executing statements</a></li><li><a href="mysqli.quickstart.prepared-statements.html">Prepared Statements</a></li><li><a href="mysqli.quickstart.stored-procedures.html">Stored Procedures</a></li><li><a href="mysqli.quickstart.multiple-statement.html">Multiple Statements</a></li><li><a href="mysqli.quickstart.transactions.html">API support for transactions</a></li><li><a href="mysqli.quickstart.metadata.html">Metadata</a></li></ul></li><li><a href="mysqli.setup.html">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli.requirements.html">需求</a></li><li><a href="mysqli.installation.html">安装</a></li><li><a href="mysqli.configuration.html">运行时配置</a></li><li><a href="mysqli.resources.html">资源类型</a></li></ul></li><li><a href="mysqli.persistconns.html">mysqli 扩展和持久化连接</a></li><li><a href="mysqli.constants.html">预定义常量</a></li><li><a href="mysqli.notes.html">Notes</a></li><li><a href="mysqli.summary.html">MySQLi 扩展的功能概述</a></li><li><a href="class.mysqli.html">MySQLi</a> — MySQLi类<ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli.affected-rows.html">mysqli::$affected_rows</a> — Gets the number of affected rows in a previous MySQL operation</li><li><a href="mysqli.autocommit.html">mysqli::autocommit</a> — 打开或关闭本次数据库连接的自动命令提交事务模式</li><li><a href="mysqli.begin-transaction.html">mysqli::begin_transaction</a> — Starts a transaction</li><li><a href="mysqli.change-user.html">mysqli::change_user</a> — Changes the user of the specified database connection</li><li><a href="mysqli.character-set-name.html">mysqli::character_set_name</a> — 返回当前数据库连接的默认字符编码</li><li><a href="mysqli.close.html">mysqli::close</a> — 关闭先前打开的数据库连接</li><li><a href="mysqli.commit.html">mysqli::commit</a> — 提交一个事务</li><li><a href="mysqli.connect-errno.html">mysqli::$connect_errno</a> — Returns the error code from last connect call</li><li><a href="mysqli.connect-error.html">mysqli::$connect_error</a> — Returns a description of the last connection error</li><li><a href="mysqli.construct.html">mysqli::__construct</a> — Open a new connection to the MySQL server</li><li><a href="mysqli.debug.html">mysqli::debug</a> — Performs debugging operations</li><li><a href="mysqli.dump-debug-info.html">mysqli::dump_debug_info</a> — 将调试信息输出到日志</li><li><a href="mysqli.errno.html">mysqli::errno</a> — 返回最近函数调用的错误代码</li><li><a href="mysqli.error-list.html">mysqli::$error_list</a> — Returns a list of errors from the last command executed</li><li><a href="mysqli.error.html">mysqli::$error</a> — Returns a string description of the last error</li><li><a href="mysqli.execute-query.html">mysqli::execute_query</a> — Prepares, binds parameters, and executes SQL statement</li><li><a href="mysqli.field-count.html">mysqli::$field_count</a> — Returns the number of columns for the most recent query</li><li><a href="mysqli.get-charset.html">mysqli::get_charset</a> — Returns a character set object</li><li><a href="mysqli.get-client-info.html">mysqli::$client_info</a> — 获取 MySQL 客户端信息</li><li><a href="mysqli.get-client-version.html">mysqli_get_client_version</a> — 作为一个整数返回MySQL客户端的版本</li><li><a href="mysqli.get-connection-stats.html">mysqli::get_connection_stats</a> — 返回客户端连接的统计数据</li><li><a href="mysqli.get-host-info.html">mysqli::$host_info</a> — 返回一个表述使用的连接类型的字符串</li><li><a href="mysqli.get-proto-info.html">mysqli::$protocol_version</a> — 返回MySQL使用的协议版本号</li><li><a href="mysqli.get-server-info.html">mysqli::$server_info</a> — 返回MySQL服务器的版本号</li><li><a href="mysqli.get-server-version.html">mysqli::$server_version</a> — 作为一个整数返回MySQL服务器的版本</li><li><a href="mysqli.get-warnings.html">mysqli::get_warnings</a> — Get result of SHOW WARNINGS</li><li><a href="mysqli.info.html">mysqli::$info</a> — 返回最近执行的 SQL 语句的信息</li><li><a href="mysqli.init.html">mysqli::init</a> — 初始化 MySQLi 并返回一个资源类型的值，这个值可以作为 mysqli_real_connect() 函数的传入参数</li><li><a href="mysqli.insert-id.html">mysqli::$insert_id</a> — 返回最后一条插入语句产生的自增 ID</li><li><a href="mysqli.kill.html">mysqli::kill</a> — 让服务器杀掉一个 MySQL 线程</li><li><a href="mysqli.more-results.html">mysqli::more_results</a> — 检查批量查询中是否还有查询结果</li><li><a href="mysqli.multi-query.html">mysqli::multi_query</a> — 执行查询</li><li><a href="mysqli.next-result.html">mysqli::next_result</a> — 为读取 multi_query 执行之后的下一个结果集做准备</li><li><a href="mysqli.options.html">mysqli::options</a> — 设置选项</li><li><a href="mysqli.ping.html">mysqli::ping</a> — ping 一个连接，或者如果连接处于断开状态，重新连接</li><li><a href="mysqli.poll.html">mysqli::poll</a> — 轮询连接</li><li><a href="mysqli.prepare.html">mysqli::prepare</a> — 准备执行一个 SQL 语句</li><li><a href="mysqli.query.html">mysqli::query</a> — 对数据库执行一次查询</li><li><a href="mysqli.real-connect.html">mysqli::real_connect</a> — 建立一个 MySQL 服务器连接</li><li><a href="mysqli.real-escape-string.html">mysqli::real_escape_string</a> — 根据当前连接的字符集，对于 SQL 语句中的特殊字符进行转义</li><li><a href="mysqli.real-query.html">mysqli::real_query</a> — 执行一个mysql查询</li><li><a href="mysqli.reap-async-query.html">mysqli::reap_async_query</a> — 获取异步查询的结果</li><li><a href="mysqli.refresh.html">mysqli::refresh</a> — 刷新</li><li><a href="mysqli.release-savepoint.html">mysqli::release_savepoint</a> — 从当前事务的保存点中移除一个命名保存点</li><li><a href="mysqli.rollback.html">mysqli::rollback</a> — 回退当前事务</li><li><a href="mysqli.savepoint.html">mysqli::savepoint</a> — 在当前事务中增加一个命名保存点</li><li><a href="mysqli.select-db.html">mysqli::select_db</a> — 选择用于数据库查询的默认数据库</li><li><a href="mysqli.set-charset.html">mysqli::set_charset</a> — 设置默认字符编码</li><li><a href="mysqli.sqlstate.html">mysqli::$sqlstate</a> — 返回上一次 SQL 操作的 SQLSTATE 错误信息</li><li><a href="mysqli.ssl-set.html">mysqli::ssl_set</a> — 使用 SSL 建立到数据库之间的安全连接</li><li><a href="mysqli.stat.html">mysqli::stat</a> — 获取当前系统状态信息</li><li><a href="mysqli.stmt-init.html">mysqli::stmt_init</a> — 初始化一条语句并返回一个用于mysqli_stmt_prepare(调用)的对象</li><li><a href="mysqli.store-result.html">mysqli::store_result</a> — 转移上一次查询返回的结果集</li><li><a href="mysqli.thread-id.html">mysqli::$thread_id</a> — 返回当前连接的线程 ID</li><li><a href="mysqli.thread-safe.html">mysqli::thread_safe</a> — 返回是否是线程安全的</li><li><a href="mysqli.use-result.html">mysqli::use_result</a> — Initiate a result set retrieval</li><li><a href="mysqli.warning-count.html">mysqli::$warning_count</a> — Returns the number of warnings from the last query for the given link</li></ul></li><li><a href="class.mysqli-stmt.html">MySQLi_STMT</a> — MySQLi_STMT类<ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli-stmt.affected-rows.html">mysqli_stmt::$affected_rows</a> — Returns the total number of rows changed, deleted, inserted, or
  matched by the last statement executed</li><li><a href="mysqli-stmt.attr-get.html">mysqli_stmt::attr_get</a> — Used to get the current value of a statement attribute</li><li><a href="mysqli-stmt.attr-set.html">mysqli_stmt::attr_set</a> — Used to modify the behavior of a prepared statement</li><li><a href="mysqli-stmt.bind-param.html">mysqli_stmt::bind_param</a> — Binds variables to a prepared statement as parameters</li><li><a href="mysqli-stmt.bind-result.html">mysqli_stmt::bind_result</a> — Binds variables to a prepared statement for result storage</li><li><a href="mysqli-stmt.close.html">mysqli_stmt::close</a> — Closes a prepared statement</li><li><a href="mysqli-stmt.construct.html">mysqli_stmt::__construct</a> — Constructs a new mysqli_stmt object</li><li><a href="mysqli-stmt.data-seek.html">mysqli_stmt::data_seek</a> — Seeks to an arbitrary row in statement result set</li><li><a href="mysqli-stmt.errno.html">mysqli_stmt::$errno</a> — Returns the error code for the most recent statement call</li><li><a href="mysqli-stmt.error-list.html">mysqli_stmt::$error_list</a> — Returns a list of errors from the last statement executed</li><li><a href="mysqli-stmt.error.html">mysqli_stmt::$error</a> — Returns a string description for last statement error</li><li><a href="mysqli-stmt.execute.html">mysqli_stmt::execute</a> — Executes a prepared statement</li><li><a href="mysqli-stmt.fetch.html">mysqli_stmt::fetch</a> — Fetch results from a prepared statement into the bound variables</li><li><a href="mysqli-stmt.field-count.html">mysqli_stmt::$field_count</a> — Returns the number of columns in the given statement</li><li><a href="mysqli-stmt.free-result.html">mysqli_stmt::free_result</a> — Frees stored result memory for the given statement handle</li><li><a href="mysqli-stmt.get-result.html">mysqli_stmt::get_result</a> — Gets a result set from a prepared statement as a mysqli_result object</li><li><a href="mysqli-stmt.get-warnings.html">mysqli_stmt::get_warnings</a> — Get result of SHOW WARNINGS</li><li><a href="mysqli-stmt.insert-id.html">mysqli_stmt::$insert_id</a> — Get the ID generated from the previous INSERT operation</li><li><a href="mysqli-stmt.more-results.html">mysqli_stmt::more_results</a> — Check if there are more query results from a multiple query</li><li><a href="mysqli-stmt.next-result.html">mysqli_stmt::next_result</a> — Reads the next result from a multiple query</li><li><a href="mysqli-stmt.num-rows.html">mysqli_stmt::$num_rows</a> — Returns the number of rows fetched from the server</li><li><a href="mysqli-stmt.param-count.html">mysqli_stmt::$param_count</a> — Returns the number of parameters for the given statement</li><li><a href="mysqli-stmt.prepare.html">mysqli_stmt::prepare</a> — Prepares an SQL statement for execution</li><li><a href="mysqli-stmt.reset.html">mysqli_stmt::reset</a> — Resets a prepared statement</li><li><a href="mysqli-stmt.result-metadata.html">mysqli_stmt::result_metadata</a> — Returns result set metadata from a prepared statement</li><li><a href="mysqli-stmt.send-long-data.html">mysqli_stmt::send_long_data</a> — Send data in blocks</li><li><a href="mysqli-stmt.sqlstate.html">mysqli_stmt::$sqlstate</a> — Returns SQLSTATE error from previous statement operation</li><li><a href="mysqli-stmt.store-result.html">mysqli_stmt::store_result</a> — Stores a result set in an internal buffer</li></ul></li><li><a href="class.mysqli-result.html">mysqli_result</a> — mysqli_result类<ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli-result.construct.html">mysqli_result::__construct</a> — Constructs a mysqli_result object</li><li><a href="mysqli-result.current-field.html">mysqli_result::$current_field</a> — Get current field offset of a result pointer</li><li><a href="mysqli-result.data-seek.html">mysqli_result::data_seek</a> — Adjusts the result pointer to an arbitrary row in the result</li><li><a href="mysqli-result.fetch-all.html">mysqli_result::fetch_all</a> — Fetch all result rows as an associative array, a numeric array, or both</li><li><a href="mysqli-result.fetch-array.html">mysqli_result::fetch_array</a> — Fetch the next row of a result set as an associative, a numeric array, or both</li><li><a href="mysqli-result.fetch-assoc.html">mysqli_result::fetch_assoc</a> — Fetch the next row of a result set as an associative array</li><li><a href="mysqli-result.fetch-column.html">mysqli_result::fetch_column</a> — Fetch a single column from the next row of a result set</li><li><a href="mysqli-result.fetch-field-direct.html">mysqli_result::fetch_field_direct</a> — Fetch meta-data for a single field</li><li><a href="mysqli-result.fetch-field.html">mysqli_result::fetch_field</a> — Returns the next field in the result set</li><li><a href="mysqli-result.fetch-fields.html">mysqli_result::fetch_fields</a> — Returns an array of objects representing the fields in a result set</li><li><a href="mysqli-result.fetch-object.html">mysqli_result::fetch_object</a> — Fetch the next row of a result set as an object</li><li><a href="mysqli-result.fetch-row.html">mysqli_result::fetch_row</a> — Fetch the next row of a result set as an enumerated array</li><li><a href="mysqli-result.field-count.html">mysqli_result::$field_count</a> — Gets the number of fields in the result set</li><li><a href="mysqli-result.field-seek.html">mysqli_result::field_seek</a> — Set result pointer to a specified field offset</li><li><a href="mysqli-result.free.html">mysqli_result::free</a> — Frees the memory associated with a result</li><li><a href="mysqli-result.getiterator.html">mysqli_result::getIterator</a> — Retrieve an external iterator</li><li><a href="mysqli-result.lengths.html">mysqli_result::$lengths</a> — Returns the lengths of the columns of the current row in the result set</li><li><a href="mysqli-result.num-rows.html">mysqli_result::$num_rows</a> — Gets the number of rows in the result set</li></ul></li><li><a href="class.mysqli-driver.html">MySQLi_Driver</a> — MySQLi_Driver类<ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli-driver.embedded-server-end.html">mysqli_driver::embedded_server_end</a> — Stop embedded server</li><li><a href="mysqli-driver.embedded-server-start.html">mysqli_driver::embedded_server_start</a> — Initialize and start embedded server</li><li><a href="mysqli-driver.report-mode.html">mysqli_driver::$report_mode</a> — Sets mysqli error reporting mode</li></ul></li><li><a href="class.mysqli-warning.html">MySQLi_Warning</a> — MySQLi_Warning类<ul class="chunklist chunklist_book chunklist_children"><li><a href="mysqli-warning.construct.html">mysqli_warning::__construct</a> — Private constructor to disallow direct instantiation</li><li><a href="mysqli-warning.next.html">mysqli_warning::next</a> — Fetch next warning</li></ul></li><li><a href="class.mysqli-sql-exception.html">mysqli_sql_exception</a> — mysqli异常类</li><li><a href="ref.mysqli.html">别名和过时的 Mysqli 函数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.mysqli-connect.html">mysqli_connect</a> — 别名 mysqli::__construct</li><li><a href="function.mysqli-escape-string.html">mysqli_escape_string</a> — 别名 mysqli_real_escape_string</li><li><a href="function.mysqli-execute.html">mysqli_execute</a> — mysqli_stmt_execute 的别名</li><li><a href="function.mysqli-get-client-stats.html">mysqli_get_client_stats</a> — 返回客户端进程统计信息</li><li><a href="function.mysqli-get-links-stats.html">mysqli_get_links_stats</a> — 返回打开和缓存的链接相关信息</li><li><a href="function.mysqli-report.html">mysqli_report</a> — 别名 mysqli_driver-&gt;report_mode</li><li><a href="function.mysqli-set-opt.html">mysqli::set_opt</a> — 别名 mysqli_options</li></ul></li></ul></div></div></div></body></html>